<?php 
class ControllerModulePoint extends Controller {
	public function index() {
		$this->language->load('module/point');
		$this->load->model('account/reward');

        if($this->customer->isLogged()){
            $this->data['is_logged']=TRUE;
        }else{
            $this->data['is_logged']=FALSE;
        }

        $this->data['reward_point']=$this->model_account_reward->getTotalPoints();
        $this->data['forum_point']=$this->customer->getForumPoints();

		$this->data['text_points'] = $this->language->get('text_points');
		$this->data['text_empty'] = $this->language->get('text_empty');
		$this->data['text_reward_point'] = $this->language->get('text_reward_point');
		$this->data['text_reward_point_tip'] = $this->language->get('text_reward_point_tip');
        $this->data['text_forum_point'] = $this->language->get('text_forum_point');
		$this->data['text_forum_point_tip'] = $this->language->get('text_forum_point_tip');
		$this->data['text_how_get_reward_points'] = sprintf($this->language->get('text_how_get_reward_points'),$this->url->link('checkout/cart'));
		$this->data['text_how_get_forum_points'] = sprintf($this->language->get('text_how_get_forum_points'),$this->url->link('checkout/cart'));
	
		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/point.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/module/point.tpl';
		} else {
			$this->template = 'default/template/module/point.tpl';
		}
				
		$this->response->setOutput($this->render());		
	}
}
?>